//
//  Profile.swift
//  CatPomodoroTimer
//
//  Created by Xuri Li on 2024/8/13.
//

import Foundation

struct Profile: Codable, Equatable {
    var focusDuration: FocusDurationLevel = .level3
    var isShowCat: Bool = true
    var isShowCount: Bool = true
    var vibrationFeedback: Bool = true
    
    static let `default` = Profile()
    
    enum FocusDurationLevel: Int, CaseIterable, Identifiable, Codable {
        case level1 = 5
        case level2 = 15
        case level3 = 25
        case level4 = 35
        case level5 = 45
        case level6 = 60
        
        var id: Int { rawValue }
    }
    
    private enum CodingKeys: String, CodingKey {
        case focusDuration, isShowCat, isShowCount, vibrationFeedback
    }
}
